package org.onion.pattern.event.springboot.rocketmq.annotation;

import org.springframework.context.event.EventListener;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * rocketmq 消息处理
 */
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@EventListener
public @interface RocketMQEventListener {

    @AliasFor(
            annotation = EventListener.class,
            attribute = "classes"
    )
    Class<?>[] value() default {};

    @AliasFor(
            annotation = EventListener.class,
            attribute = "classes"
    )
    Class<?>[] classes() default {};


    @AliasFor(
            annotation = EventListener.class,
            attribute = "condition"
    )
    String condition() default "";

    boolean idempotent() default false;
}
